<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>满分公司OA系统</title>

    <!-- Bootstrap Core CSS -->
    <link href="/myshop/OA/Public/MB_PUBLIC/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="/myshop/OA/Public/MB_PUBLIC/css/sb-admin.css" rel="stylesheet">

    <!-- Morris Charts CSS -->
    <link href="/myshop/OA/Public/MB_PUBLIC/css/plugins/morris.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="/myshop/OA/Public/MB_PUBLIC/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

    <!-- MY CSS -->
    <link href="/myshop/OA/Public/MY_PUBLIC/my.css" rel="stylesheet">

    <!-- jquery -->
    <script src="/myshop/OA/Public/MY_PUBLIC/jquery-1.8.3.min.js"></script>

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>
<!-- style="background:url('/myshop/OA/Public/css/a.jpeg')" -->
<body style="background-image:url('/myshop/OA/Public/css/a.jpeg');">


    <div id="wrapper" style="background-image:url('/myshop/OA/Public/css/a.jpeg');">

        <!-- Navigation -->
        <nav class="navbar navbar-inverse navbar-fixed-top" style='background-color:#f0f0f0;border:0px solid white;'role="navigation">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header ">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" style='color:#9D9D9D;' href="index.html">满分公司OA系统</a>
            </div>
            <!-- Top Menu Items -->
            <ul class="nav navbar-right top-nav">
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i> <?php echo ($_SESSION['user']['name']); ?>,欢迎您<b class="caret"></b></a>
                    <ul class="dropdown-menu">
                        <li>
                            <a href="<?php echo U('Gr/index');?>"><i class="fa fa-fw fa-user"></i> 个人中心</a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="<?php echo U('Denglu/logout');?>"><i class="fa fa-fw fa-power-off"></i> 退出</a>
                        </li>
                    </ul>
                </li>
            </ul>
            <!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
            <div class="collapse navbar-collapse navbar-ex1-collapse">
                <ul class="nav navbar-nav side-nav h4">
                    <li >
                        <a href="<?php echo U('Yg/index');?>"><i class="glyphicon glyphicon-home">&nbsp;</i>员工通道首页</a>
                    </li>
                    <li>
                        <a href="<?php echo U('Lxr/index');?>"><i class="glyphicon glyphicon-earphone">&nbsp;</i>公司联系人</a>
                    </li>
                    <li>
                        <a href="<?php echo U('Message/index');?>"><i class="glyphicon glyphicon-comment">&nbsp;</i> 留言板</a>
                    </li>
                    <li>
                        <a href="javascript:;" data-toggle="collapse" data-target="#demo3"><i class="glyphicon glyphicon-user">&nbsp;</i> 邮箱管理 <i class="fa fa-fw fa-caret-down"></i></a>
                        <ul id="demo3" class="collapse">
                            <li>
                                <a href="<?php echo U('Email/index');?>"> &nbsp;&nbsp;&nbsp;&nbsp;新邮件</a>
                            </li>
                            <li>
                                <a href="<?php echo U('Email/read');?>"> &nbsp;&nbsp;&nbsp;&nbsp;已读邮件</a>
                            </li>
                            <li>
                                <a href="<?php echo U('Email/add');?>"> &nbsp;&nbsp;&nbsp;&nbsp;书写邮件</a>
                            </li>
                        </ul>
                    </li>
                     <li <?php if($_SESSION['user']['uposition']>3){echo "style='display:none';";} ?>>
                        <a href="javascript:;" data-toggle="collapse" data-target="#demo"><i class="glyphicon glyphicon-user">&nbsp;</i> 员工管理 <i class="fa fa-fw fa-caret-down"></i></a>
                        <ul id="demo" class="collapse">
                            <li>
                                <a href="<?php echo U('User/index');?>"> &nbsp;&nbsp;&nbsp;&nbsp;员工列表</a>
                            </li>
                            <li>
                                <a href="<?php echo U('User/add');?>"> &nbsp;&nbsp;&nbsp;&nbsp;添加员工</a>
                            </li>
                        </ul>
                    </li>
                    <li <?php if($_SESSION['user']['uposition']>3){echo "style='display:none';";} ?>>
                        <a href="<?php echo U('Notice/index');?>"><i class="glyphicon glyphicon-send">&nbsp;</i> 公告系统 </a>
                    </li>
                    <li <?php if($_SESSION['user']['uposition']>2){echo "style='display:none';";} ?>>
                        <a href="javascript:;" data-toggle="collapse" data-target="#demo1"><i class="glyphicon glyphicon-briefcase">&nbsp;</i> 部门管理 <i class="fa fa-fw fa-caret-down"></i></a>
                        <ul id="demo1" class="collapse">
                            <li>
                                <a href="<?php echo U('Group/index');?>"> &nbsp;&nbsp;&nbsp;&nbsp;部门列表</a>
                            </li>
                            <li>
                                <a href="<?php echo U('Group/add');?>"> &nbsp;&nbsp;&nbsp;&nbsp;添加部门</a>
                            </li>
                        </ul>
                    </li>
                    <li <?php if($_SESSION['user']['uposition']>2){echo "style='display:none';";} ?>>
                        <a href="<?php echo U('Jyx/index');?>"><i class="glyphicon glyphicon-eye-open">&nbsp;</i> 建议箱 </a>
                    </li>
                    <li <?php if($_SESSION['user']['uposition']>2){echo "style='display:none';";} ?>>
                        <a href="<?php echo U('Friendly/index');?>"><i class="glyphicon glyphicon-link">&nbsp;</i> 友情链接管理 </a>
                    </li>
                    <li <?php if($_SESSION['user']['uposition']>2){echo "style='display:none';";} ?>>
                        <a href="<?php echo U('Boss/index');?>"><i class="glyphicon glyphicon-sort">&nbsp;</i> 职位管理</a>
                    </li>
                </ul>
            </div>
            <!-- /.navbar-collapse -->
        </nav>
        
<div id="page-wrapper" style="background-image:url('/myshop/OA/Public/css/a.jpeg');">

            <div class="container-fluid">

                <!-- Page Heading -->
                <div class="row">
                    <div class="col-lg-12">
                        <h2 class="page-header">
                            职位管理
                        </h2>
                        <ol class="breadcrumb">
                            <li class="active">
                                <i class="fa fa-dashboard"></i> 您的位置 => 员工职位列表
                            </li>
                        </ol>
                    </div>
                </div>
                <form class="form-horizontal" action="<?php echo U('User/index');?>" method="get">
                            <div class="form-group">
                                 <label for="inputEmail3" class="col-sm-1 control-label">姓名：</label>
                                <div class="col-sm-3">
                                    <input type="text"   class="form-control"   id="inputEmail3"   name="n"   value="<?php echo $_GET['n'] ?>" />
                                </div>
                                 <label for="inputPassword3" class="col-sm-1 control-label">部门：</label>
                                <div class="col-sm-3">
                                    <select class="form-control" id="sel" name="g">
                                        <option value=''>全部</option>
                                    <?php if(is_array($group)): $i = 0; $__LIST__ = $group;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><option value=<?php echo ($i); ?> <?php if($_GET['g']==$i){echo selected;} ?> ><?php echo ($v); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                    </select>
                                </div>
                                <div class="col-sm-1">
                                     <button type="submit" class="btn btn-default">查询</button>
                                </div>
                            </div>
                        </form>
                <!-- /.row -->
                <table class="table table-striped table-bordered table-hover">
			<thead>
				<tr align='left' bgcolor="#D9EDF7">
					<th>ID</th>
					<th>真实姓名</th>
					<th>部门</th>
                    <th>部门操作</th>
					<th>职位</th>
					<th>职位操作</th>
                    <th>离职管理</th>
				</tr>
			</thead>
			<tbody>
			<?php if(is_array($lista)): $i = 0; $__LIST__ = $lista;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
					<td><?php echo ($vo["id"]); ?></td>
					<td><?php echo ($vo["name"]); ?></td>
					<td><?php echo ($vo["gid"]["groupname"]); ?></td>
                    <td>
                        <a href="<?php echo U('Boss/bmtiaozheng',array('groupid'=>$vo['groupid'],'id'=>$vo['id']));?>">调整部门</a>
                    </td>
					<td><?php echo ($vo["pid"]["remark"]); ?></td>
					<td>
						<a href="<?php echo U('Boss/zwtiaozheng',array('id'=>$vo['id']));?>">调整职位</a>
					</td>
                    <td  data-user="<?php echo ($vo["id"]); ?>" id='userid'>
                       
                        
             <a id="modal-1" href="#modal-container-<?php echo ($vo["id"]); ?>" role="button" class="btn" data-toggle="modal">离职</a>
            
            <div class="modal fade" id="modal-container-<?php echo ($vo["id"]); ?>" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> 
                <div class="modal-dialog">
                    <div class="modal-content">
   
                        <div class="modal-body">
                          您确定要解雇该员工吗?!
                        </div>
                        <div class="modal-footer">
                             <button type="button" class="btn" data-dismiss="modal">关闭</button><button type="button" class="btn"><a href="<?php echo U('Boss/fire',array('id'=>$vo['id']));?>">
                            
                             确认</a></button>
                        </div>
                    </div>
                    
                </div>
                
            </div>
            



            
                    </td>
				</tr><?php endforeach; endif; else: echo "" ;endif; ?>
			</tbody>
			
			
		</table>
                <div class="pagination"><?php echo ($page); ?></div>        
            </div>
            <!-- /.container-fluid -->
<!--             <script>
                $(function(){
                     $("#lizhi").click(function(){
                       return confirm("是否确认离职?");
                      });
                    });
            </script> -->
        </div>


        <!-- /#page-wrapper -->

    </div>
    <!-- /#wrapper -->
    <!-- 自己写的JS  -->

    <!-- jQuery -->
    <script src="/myshop/OA/Public/MB_PUBLIC/js/jquery.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="/myshop/OA/Public/MB_PUBLIC/js/bootstrap.min.js"></script>

    <!-- Morris Charts JavaScript -->
    <script src="/myshop/OA/Public/MB_PUBLIC/js/plugins/morris/raphael.min.js"></script>
    <script src="/myshop/OA/Public/MB_PUBLIC/js/plugins/morris/morris.min.js"></script>
    <script src="/myshop/OA/Public/MB_PUBLIC/js/plugins/morris/morris-data.js"></script>

</body>

</html>